package com.code.cheney.shiro.dao;

import java.util.Set;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.code.cheney.shiro.entity.User;

/**
 * 
 * Project: shiro Class: UserDao Description:
 * 
 * @author: Cheney
 * @Date 2016年6月30日 下午9:26:05
 * @version 1.0
 * 
 */
@Repository
public interface UserDao {
	public Long createUser(User user);

	public void updateUser(User user);

	public void deleteUser(Long userId);

	public void correlationRoles(@Param("1")Long userId, @Param("2")Long roleId);

	public void uncorrelationRoles(@Param("1")Long userId, @Param("2")Long roleId);
	
	boolean exists(@Param("1")Long userId, @Param("2")Long roleId);

	User findOne(Long userId);

	User findByUsername(String username);

	Set<String> findRoles(String username);

	Set<String> findPermissions(String username);
	
	void delete1();
	void delete2();
	void delete3();
	void delete4();
	void delete5();
}
